﻿using System;
using System.Configuration;

namespace Sustainalytics.CarbonData.Service
{
    public static class HostConfig
    {
        public static string GetHostUrl()
        {
            var url = ConfigurationManager.AppSettings["httpHostUrl"];
#if !DEBUG
            var uriBuilder = new UriBuilder(url)
            {
                Scheme = Uri.UriSchemeHttps,
                Port = Int32.Parse(ConfigurationManager.AppSettings["httpsPort"])
            };
            url = uriBuilder.Uri.ToString();
#endif
            return url;
        }
    }
}
